package com.bupt.ilink.service;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.List;

public interface OssService {
    boolean uploadFile(MultipartFile file, String path, String rename);
    boolean uploadFile(byte[] bytes, String path, String rename);
    boolean uploadFile(File file,String path,  String rename);

    String[] uploadBase64Images(String[] images);

    String getFileUrl(String objectName);

    String getBucketFileUrl(String bucketName, String objectName);

    List<String> listFiles(String prefix);

    boolean deleteFile(String fileName,String path);
    boolean deleteDirectory(String directory);

    boolean createDirectory(String directory, String path);

    boolean moveFile(String filename, String ori_path, String tar_path);
    boolean moveTranFile(String ori, String des);

    boolean uploadUrl(String fileUrl, String objectName);

    public boolean moveDirectory(String ori_path, String tar_path);

    String getImageUrl(String bucketName, String objectBaseName);
    String getIconUrl(String bucketName, String objectBaseName);
    String getStudyTreeResourceUrl(String bucketName, String objectBaseName);
}
